/**
 * Beijing Jiaotong University
 * Copyright (c) 1896-2016 All Rights Reserved.
 */
package com.fesc.trade.demo.model;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 商品明细
 * @author HuHui
 * @version $Id: GoodsDetail.java, v 0.1 2016年8月18日 上午11:18:43 HuHui Exp $
 */
public class GoodsDetail extends BaseModel {

    /**  */
    private static final long serialVersionUID = -4433151344679543732L;

    // 商品编号(国标)
    @JSONField(name = "goods_id")
    private String            goodsId;

    @JSONField(name = "alipay_goods_id")
    private String            alipayGoodsId;

    // 商品名称
    @JSONField(name = "goods_name")
    private String            goodsName;

    // 商品数量
    private int               quantity;

    // 商品价格，此处单位为元，精确到小数点后2位
    private String            price;

    // 商品类别
    @JSONField(name = "goods_category")
    private String            goodsCategory;

    // 商品详情
    private String            body;

    // 创建一个商品信息，参数含义分别为商品id（使用国标）、商品名称、商品价格（单位为元）、商品数量
    public static GoodsDetail newInstance(String goodsId, String goodsName, String price, int quantity) {
        GoodsDetail goodsDetail = new GoodsDetail();
        goodsDetail.setGoodsId(goodsId);
        goodsDetail.setGoodsName(goodsName);
        goodsDetail.setPrice(price);
        goodsDetail.setQuantity(quantity);
        return goodsDetail;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getAlipayGoodsId() {
        return alipayGoodsId;
    }

    public void setAlipayGoodsId(String alipayGoodsId) {
        this.alipayGoodsId = alipayGoodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getGoodsCategory() {
        return goodsCategory;
    }

    public void setGoodsCategory(String goodsCategory) {
        this.goodsCategory = goodsCategory;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

}
